import {reqInfo} from "../api";

interface Info {
    name: string,
    email: string
}

export default async (info: Info) => {
    const result = await reqInfo(document.cookie)

    if (result.status === 200) {
        const user = result.data;
        return user.name === info.name && user.email === info.email;
    } else {
        return false
    }
}